/*!
\file Visualizer.h
\brief Contains definition of Visualizer class.
\ingroup GUI
*/

#ifndef VISUALIZER_H
#define VISUALIZER_H

#include"Algorithm.h"
#include"AlgorithmVisualizer.h"

#include<QWidget>
#include<QVBoxLayout>
#include<QTabWidget>
#include<QString>

/*!
\class Visualizer
\brief Visualizer class. Inherits QTabWidget to display several AlgorithmVisualizer s. Those can be added into this object and will be displayed.
*/

class Visualizer: public QTabWidget{
	Q_OBJECT
public:
	Visualizer( QWidget *parent = 0 );
	/*!< Constructor.*/
	~Visualizer();
	//!< Destructor.
	
	void addAlgorithm( Algorithm *a, QString name = QString() );
	//!< Display an Algorithm, name should be given to display on tab.
	VisualizationSettings *settings(int i)const{ return m_visualizers[i]->settings(); }
	//!< Return VisualizationSettings used for Algorithm i.
private:
	QVBoxLayout *m_layout;
	QList<AlgorithmVisualizer*> m_visualizers;
private slots:
	void closeTab( int i );
};

#endif

